import {lazy} from 'react'
const routers=[
    {
       from:'/',
       to:'/home'
    },
    {
        path:'/home',
        component:lazy( ()=>import('../view/Home') ),
        children:[
            {
                to:'/home/index',
                from:'/home'
            },
            {
                path:'/home/index',
                component:lazy( ()=>import('../view/Index') ),
                title:'点餐'
            },
            {
                path:'/home/comment',
                component:lazy( ()=>import('../view/Comment') ),
                title:'评论'
            },
            {
                path:'/home/shop',
                component:lazy( ()=>import('../view/Shop') ),
                title:'商家'
            },
        ]
    }
]
export default routers